<extend name="template/base_index" />

<block name="area_header">

</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}

			<!-- 标题栏 -->
			<div class="main-title">
				<h2 class="text-center">用户行为日志</h2>
			</div>
			
			<div class="btn-controls">
				<a class="btn btn-danger btn-sm ajax-get confirm" href="{:U('Admin/ActionLog/clear')}"><i class="fa fa-trash-o"></i>清 空</a>
				<a class="btn btn-danger btn-sm ajax-post confirm" target-form="ids" href="{:U('Admin/ActionLog/remove')}"><i class="fa fa-trash"></i>删 除</a>
			</div>
			<!-- 数据列表 -->
			<div class="table-responsive">
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th class="row-selected row-selected">
								<input class="select-all" onclick="window.myUtils.selectall('.select-all','.ids')" type="checkbox" />
							</th>
							<th class="">编号</th>
							<th class="">行为名称</th>
							<th class="">执行者</th>
							<th class="">执行时间</th>
							<th class="">操作</th>
						</tr>
					</thead>
					<tbody>
						<notempty name="_list">
							<volist name="_list" id="vo">
								<tr>
									<td>
										<input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" />
									</td>
									<td>{$vo.id} </td>
									<td>{:get_action($vo['action_id'],'title')}</td>
									<td>{:get_nickname($vo['user_id'])}</td>
									<td>
										<span>{$vo.create_time|time_format}</span>
									</td>
									
									<td>
										<a class="btn btn-sm btn-default" href="{:U('Admin/ActionLog/view?id='.$vo['id'])}"><i class="fa fa-eye"></i>详细</a>
										<a class="confirm ajax-get btn btn-sm btn-danger" href="{:U('Admin/ActionLog/remove?ids='.$vo['id'])}"><i class="fa fa-trash"></i>删除</a>
									</td>
								</tr>
							</volist>
							<else/>
							<td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
						</notempty>
					</tbody>
				</table>
			</div>
			<!-- 分页 -->
			<div class="page">{$_page}</div>
			<!-- /分页 -->

		</div>
		<!-- END admin-main-content -->
	</div>
	<!-- END admin-main-->
</block>

<block name="area_footer">

</block>